#include "ClassDemo.h"

ClassDemoC::ClassDemoC() {
	std::cout << "I'm created!-" << func() << std::endl;
}

ClassDemoC::~ClassDemoC() {
	std::cout << "Bye!" << func() << std::endl;
}

void ClassDemoC::Say() {
	std::cout << "Hi, I'm " << func() << std::endl;
}

std::string ClassDemoC::func() {
	return "ClassDemoC";
}

ClassDemoD::ClassDemoD() {
	std::cout << "I'm created!-" << func() << std::endl;
}

ClassDemoD::ClassDemoD(const std::string& para) {
	std::cout << "I'm created!-" << func() << " " << para << std::endl;
}

ClassDemoD::~ClassDemoD() {
	std::cout << "Bye!" << func() << std::endl;
}

void ClassDemoD::Say() {
	std::cout << "Hi, I'm " << func() << std::endl;
}

std::string ClassDemoD::func() {
	return "ClassDemoD";
}